package org.example.system.domain.bo;


import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.example.common.core.constants.Constants;
import org.example.system.domain.SysOauthClient;

import java.io.Serializable;

/**
 * 客户端信息
 */
@Data
@AutoMapper(target = SysOauthClient.class, reverseConvertGenerate = false)
public class SysOauthClientBo implements Serializable {

    private static final long serialVersionUID = -6947822646185526939L;

    /**
     * 客户端ID
     */
    private String clientId;
    /**
     * 资源的id，多个用逗号分隔
     */
    private String resourceIds;

    /**
     * 客户端的秘钥密文secret
     */
    private String clientSecret;
    /**
     * Available values: read,write（权限,多个用逗号分隔）
     */
    private String scope;

    /**
     * grant types include
     * "authorization_code", "password", "assertion", and "refresh_token".
     * Default value is "authorization_code,refresh_token".
     * 授权登录方式
     */
    private String authorizedGrantTypes = "authorization_code,refresh_token";

    /**
     * The re-direct URI(s) established during registration (optional, comma separated).
     * 授权码模式的跳转uri
     */
    private String webServerRedirectUri;

    /**
     * Authorities that are granted to the client (comma-separated). Distinct from the authorities
     * granted to the user on behalf of whom the client is acting.
     * <p/>
     * For example: ROLE_USER
     * 权限,多个用逗号分隔
     */
    private String authorities;

    /**
     * The access token validity period in seconds (optional).
     * If unspecified a global default will be applied by the token services.
     * access_token的过期时间，单位毫秒，覆盖掉硬编码
     */
    private Integer accessTokenValidity= Constants.ACCESS_TOKEN_VALIDITY_SECONDS;

    /**
     * The refresh token validity period in seconds (optional).
     * If unspecified a global default will  be applied by the token services.
     * refresh_token的过期时间，单位毫秒，覆盖掉硬编码
     */
    private Integer refreshTokenValidity= Constants.REFRESH_TOKEN_VALIDITY_SECONDS;
    /**
     *    optional扩展字段，JSON
     */
    private String additionalInformation;
    /**
     * The client is trusted or not. If it is trust, will skip approve step
     * default false.
     */
    private boolean trusted = false;
    /**
     * Value is 'true' or 'false',  default 'false'
     */
    private String autoapprove;
    /**
     * 描述
     */
    private String remark;

    private String status;

}
